<%@ include file="/common/taglibs.jsp" %>

<stripes:layout-render name="/common/defaultLayout.jsp" titleKey="login.title">
    <stripes:layout-component name="content">
		<div class="message">
		    <h1><fmt:message key="login.head" bundle="${yabamResources}"/></h1>
		    <p>
			    <fmt:message key="login.message" bundle="${yabamResources}">
			    	<fmt:param>
						<stripes:link href="/register.jsp"><fmt:message key="login.message.register" bundle="${yabamResources}"/></stripes:link>
			    	</fmt:param>
			    </fmt:message>
			</p>
			<c:if test="${!empty loggedOwner}">
			    <p>
			    	<fmt:message key="login.alreadylogged" bundle="${yabamResources}">
			    		<fmt:param>${loggedOwner.name}</fmt:param>
			    	</fmt:message>
			    </p>
			</c:if>
		</div>

        <stripes:errors action="/Login.action"/>
		<stripes:form action="/Login.action" focus="">
			<p>
				<stripes:label for="owner.login"/> : <stripes:text name="owner.login"/>
			</p>
			<p>
				<stripes:label for="owner.password"/> : <stripes:password name="owner.password"/>
			</p>
			<%-- If the security servlet attached a targetUrl, carry that along. --%>
			<stripes:hidden name="targetUrl" value="${request.parameterMap['targetUrl']}"/>
			<stripes:submit name="login"><fmt:message key="login.submit" bundle="${yabamResources}"/></stripes:submit>
		</stripes:form>
    </stripes:layout-component>
</stripes:layout-render>